#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int num = 100;
	do
	{
		int a, b, c;
		a = num % 10;
		b = num / 10 % 10;
		c = num / 100;
		if (a * a * a + b * b * b + c * c * c == num)
			printf("%d\n",num);
		num++;
	} while (num < 1000);
	return 0;
}